package com.example.mapp;

import com.example.entity.authority.PartyRoleType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by youkun on 2018/3/20.
 * 机构和角色类型的关系
 */
@Mapper
public interface PartyRoleTypeMapp {

    @Insert("insert into party_role_type (party_Type,role_Type_Id) values (#{partyType},#{roleTypeId})")
    int insert(PartyRoleType partyRoleType) throws Exception;

    @Delete("delete from party_role_type where role_Type_Id=#{roleTypeId}")
    int delete(Long roleTypeId)throws Exception;

    @Select("select * from party_role_type where role_Type_Id=#{roleTypeId}")
    List<PartyRoleType> queryByRoleType(String roleTypeId)throws Exception;
}
